var express = require('express')
,   ejs     = require('ejs')
,   core    = require('core')
,   path    = require('path')
,   config  = require('./config')
,   app     = express();

// 设置模板
app.set('views', path.join(__dirname, 'views'));
app.engine('.html', ejs.renderFile);
app.set('view engine', 'html');

// 核心设置
core.init.call(app, config);

module.exports = app;
